#!/bin/bash

#generate a file include all student name
cat >stu_name.txt <<EOF
zhouchang
liwen
zhaowei
zengfenghua
yiguowen
wanda
tangqingyu
liaobingbing
huqianshen
caoyong
chenxingming
hubiwu
xianglingbo
zhangshuai
liqiang
wangtao
sunqiang
cali
EOF

#create an array store all student name

students_name=(`cat stu_name.txt`)

#get a random number

students_c=${#students_name[@]}
lucky_num=$(($RANDOM%$students_c))
echo -e "please \e[31m${students_name[lucky_num]}\e[0m answer teacher feng's question"

